<?php echo $this->render('./includes/header.phtml');?>
<?php echo $this->render('./includes/fix_top_menu.phtml');?>
	<div id="container" class="row-fluid">
		<?php echo $this->render('./includes/menu.phtml');?>
		<div id="main-content">
			<div class="container-fluid">
				<div class="row-fluid">
					<div class="span12">
						<h3 class="page-title">
							Quản lí báo cáo sai phạm  <small></small>
						</h3>
					</div>
				</div>
							<div class="row-fluid">
					<div class="span12">
						<div class="widget">
							<div class="widget-title">
								<h4>
									<i class="icon-reorder"></i>Tổng số : <?php echo $this->total_report;?>
								</h4>
							</div>
							<div class="widget-body">
								<?php echo $this->render('./includes/display_alert_message.phtml');?>
								<table class="table table-striped table-bordered" id="sample_1">
									<thead>
										<tr>
											<th>Ảnh </th>
											<th>Địa điểm </th>
											<th class="hidden-phone">Thành viên </th>
											<th class="hidden-phone">Bình luận </th>
											<th class="hidden-phone span3 "></th>
										</tr>
									</thead>
									<tbody>
									<?php 
									if(count($this->arrReport) != 0) {
									$iCountReport = 0;
									foreach ($this->arrReport as $report) {?>
										<tr class="odd gradeX">
											<td>
												<?php if(isset($this->arrPhoto[$iCountReport][0]['photo_link'])) {?>
												<div class="thumbnail" style="height: 50px; width: 50px;">
												<div class="item" style="height: 50px; width: 50px;">
													<a class="fancybox-button" data-rel="fancybox-button"
														title="" href="<?php echo  $this->baseUrl(UPLOAD_PHOTO_DIRECTORY.$this->arrPhoto[$iCountReport][0]['photo_link']); ?>"><div
															class="zoom">
															<img src="<?php echo  $this->baseUrl(UPLOAD_PHOTO_DIRECTORY.$this->arrPhoto[$iCountReport][0]['photo_link']); ?>" alt="" style="height: 50px; width: 50px;" />
															<div class="zoom-icon" style="height: 50px; width: 50px;"></div>
														</div></a>
													</div>
												</div>
												<?php } else {?>
												
												<?php }?>
											</td>
											<td>
												<?php if(isset($this->arrLoc[$iCountReport][0]['name'])) {?>
												<?php echo $this->arrLoc[$iCountReport][0]['name'];?>
												<?php } else {?>
												---
												<?php }?>
											</td>
											<td class="hidden-phone">
												<?php if(isset($this->arrUser[$iCountReport][0]['username'])) {?>
												<?php echo $this->arrUser[$iCountReport][0]['username'];?>
												<?php }?>
											</td>
											<td class="hidden-phone">
												<?php if(isset($this->arrCmt[$iCountReport][0]['content'])) {?>
												<?php echo   ($this->arrCmt[$iCountReport][0]['content']); ?>
												<?php }?>
											</td>
											<td class="hidden-phone span3">
												<a href="<?php echo $this->baseUrl('/report/?approve=1&report_id='.$report['report_id']).'&cmt_id='.$this->arrCmt[$iCountReport][0]['comment_id'];?>" class="btn btn-info" title="Xác nhận  "> <i class="icon-ok"></i> Xác nhận </a>
												<a href="<?php echo $this->baseUrl('/report/?delete=1&report_id='.$report['report_id']);?>" class="btn btn-danger" title="Xoá " onclick="return confirm('Xoá báo cáo sai phạm ?');"> <i class="icon-trash"></i> Xoá </a>
											</td>
										</tr>
										<?php 
										$iCountReport++;
										}
										}?>
									</tbody>
								</table>
								<?php if(count($this->arrReport) != 0) {?>
 								<?php echo $this->paginationControl($this->arrReport, 'Sliding' , './includes/pagination.phtml'); ?>
 								<?php }?>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
<?php echo $this->render('./includes/footer.phtml');?>